<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body  >
<div style="font-family:Arial, Helvetica, sans-serif;" >
<div id="message"></div>
<h1>All &quot;Modified Items&quot; in the Order are listed Here:<br />
  All the other items are following &quot;Recommended&quot; Qty
</h1>
<h2><?php echo $this->errorMsg;?></h2>
  <br />
All Extra Added Barcode will show in <span style="background:#6666CC;">Dark Purple Color</span> <br />
<br />
<table width="1100" border="1" cellspacing="0" cellpadding="10" style="font-size:13px;" id="product_table">
  <thead> 
  <tr>
    <th rowspan="2" scope="col">No</th>
    <th rowspan="2" scope="col">Hot</th>
    <th rowspan="2" scope="col">Code</th>
    <th width="350" rowspan="2" scope="col">Des</th>
    <th colspan="3" scope="col">Sales<br /></th>
    <th colspan="2" scope="col">Stock</th>
    <th rowspan="2" scope="col">Reco-<br />
      mmend</th>
    <th rowspan="2" scope="col">Order</th>

  </tr>

  <tr>
    <th scope="col">2Wk <br />
      Ago</th>
    <th scope="col">Last<br />
      Wk</th>
    <th scope="col">Max<br />
      4Wk</th>
    <th scope="col">SH</th>
    <th scope="col">WH</th>
  </tr>
 </thead> 
 <tfoot> 
  <tr>
    <th rowspan="2" scope="col">No</th>
    <th rowspan="2" scope="col">Hot</th>
    <th rowspan="2" scope="col">Code</th>
    <th width="350" rowspan="2" scope="col">Des</th>
    <th colspan="3" scope="col">Sales<br /></th>
    <th colspan="2" scope="col">Stock</th>
    <th rowspan="2" scope="col">Reco-<br />
      mmend</th>
    <th rowspan="2" scope="col">Order</th>

  </tr>

  <tr>
    <th scope="col">2Wk <br />
      Ago</th>
    <th scope="col">Last<br />
      Wk</th>
    <th scope="col">Max<br />
      4Wk</th>
    <th scope="col">SH</th>
    <th scope="col">WH</th>
  </tr>
 </tfoot>  
 <tbody>
  <?php 
  
  $locs = new Model_Products_Location();
  foreach($this->orderList as $idCate => $detail){
 ?>
 <tr style=" background-color:#80FF80">
 <td bgcolor="#CCCCCC" >&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC" ><b><?php echo $this->arrOrderCate[$idCate];?></b></td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 <td bgcolor="#CCCCCC">&nbsp;</td>
 </tr>
 <?	  

  foreach($detail as $k => $v){
	 if($v['qty_order_shop'] != $v['qty_order'] || $v['is_extra'] != ''){ 
	  
	  ?>
  <tr >
    <td align="center"><?php echo $k + 1;?></td>
    <td><?php echo $v['status_hot'];?></td>
    <td><span <?php  
	if($v['is_extra'] == 1){echo 'style="background:#6666CC;"'; }
	if($v['is_extra'] == 2){echo 'style="background:#99CCFF;"'; }
	?>
	><?php echo $v['code_product'];?></span></td>
    <td><span <?php 
	if($v['is_extra'] == 1){echo 'style="background:#6666CC;"'; }
	if($v['is_extra'] == 2){echo 'style="background:#99CCFF;"'; }
	
	?> ><?php echo $v['des_product'];?></span></td>
    <td align="center"><?php echo $v['qty_sales_w2'];?></td>
    <td align="center"><?php echo $v['qty_sales_w1'];?></td>
    <td align="center"><?php echo $v['qty_max_sold'];?></td>
    <td align="center"><?php echo $v['stock_shop'];?></td>
    <td align="center"><?php echo $v['stock_wh'];?></td>
    <td align="center"><span style="color:#AAA;"><?php echo $v['qty_order'];?></span></td>
    <td align="center"
    <?php
    echo ($v['qty_order_shop'] >= $v['qty_order'])?'style="background-color:#BFB";':'style="background-color:#FFA4A4";';
	?>
    ><?php echo $v['qty_order_shop'];?></td>
  
  </tr>
  <?php 
	 }
  	}
  }
  ?>
  </tbody>
  
</table>
<form id="form1" name="form1" method="post" action="">
<br />
<h1>All the other items are following &quot;Recommended&quot; Qty </h1>
<a id="btn_modify" href="/products/modify-weeks-order-v2/shop/<?php echo $this->shop;?>"  style="font-size:18px; padding:10px; background:#FFA4A4; border:#900 solid 2px; display:block; text-decoration:none; color:#000; width:300px; text-align:center;">I need to modify order again</a>
<br />
<br />
<input type="submit" name="btn_notify" id="btn_notify" value="I Have Finished The Order,Send Warehouse Notification" style="font-size:18px; background:#BFB; border:#060 solid 2px; padding:10px;" />
 <br />
 <br />
 (Please note after you click this button, your order will be locked and you <b>CAN NOT</b> modify it again)
 <br />
</form>
</div>
</body>

</html>
